package com.nhjf.pojo.system;

import java.util.Map;
import java.util.TreeMap;

/**
 * 
 * @类功能说明：系统管理静态常量
 * @版本：V1.0
 *
 */
public class AuthConstants {

	
	/*******************资源类型 *****************************/
	
	public static final Map<String,String> resourceTypeMap = new TreeMap<String,String>();
	
	/*****模块*****/
	public static final Long RESOURCE_TYPE_MODULE = 1L;
	/*****资源*****/
	public static final Long RESOURCE_TYPE_RESOURCE = 2L;
	
	static{
		resourceTypeMap.put(RESOURCE_TYPE_MODULE + "", "模块");
		resourceTypeMap.put(RESOURCE_TYPE_RESOURCE + "", "资源");
	}
	
	/**********************用户状态*****************************/
	public static final Map<String,String> userStatuMap = new TreeMap<String,String>();
	
	/****禁用***/
	public static final String USER_STATU_NOT_ACTIVE = "0";
	/****可用***/
	public static final String USER_STATU_ACTIVE = "1";
	
	static{
		userStatuMap.put(USER_STATU_NOT_ACTIVE , "禁用");
		userStatuMap.put(USER_STATU_ACTIVE , "未禁用");
	}
	
	/**********************用户Session*****************************/
	/***登录用户信息放在Session中的key***/
	public static final String USER_INFO = "user";
	/***用户登录日志信息放在Session中的key***/
	public static final String USER_LOGIN_LOG_INFO = "l";
	
	
	/**********************URL*****************************/
	
	/*** 无需进行权限过滤的URL ****/
	public static final String[] DO_NOT_NEED_AUTH_URL = {
		"/login/check",
		"/home",
		"/resources",	//js,css
		"/resource/unauthorized",
		"/login/unlogin",
		"/login/showLoginDialog"
	};
	
	/*** 无需登录校验的URL ****/
	public static String[] DO_NOT_NEED_LOGIN_URL = {
		"/login/check",
		"/resources",	//js,css
		"/resource/unauthorized",
		"/login/unlogin",
		"/login/showLoginDialog"
	};
	
	/**********************用户登录日志类别*****************************/
	/****登录失败***/
	public static final String LOGIN_TYPE_FAIL = "0";
	/****登录成功***/
	public static final String LOGIN_TYPE_SUCCESS = "1";
	/****登录成功***/
	public static final String LOGIN_TYPE_OUT = "2";
	
	
}
